Fixes for correct itir handling in vcpu_translate (broke simulator)
authordjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Tue, 11 Oct 2005 21:50:21 +0000 (15:50 -0600)
committerdjm@kirby.fc.hp.com <djm@kirby.fc.hp.com>
Tue, 11 Oct 2005 21:50:21 +0000 (15:50 -0600)
xen/arch/ia64/xen/vcpu.c

index 769892b2b4f214ab7185b03ade29f6364bf055d8..f3990a6cf5824b5971d27450f1077c0eae218fca 100644 (file)
@@ -1403,9 +1403,11 @@ IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address, BOOLEAN is_data, UINT64 *pt
                return (is_data ? IA64_DATA_TLB_VECTOR : IA64_INST_TLB_VECTOR);
 
        vcpu_thash(vcpu, address, iha);
-       if (__copy_from_user(&pte, (void *)(*iha), sizeof(pte)) != 0)
+       if (__copy_from_user(&pte, (void *)(*iha), sizeof(pte)) != 0) {
 // FIXME?: does itir get set for vhpt faults?
+               *itir = vcpu_get_itir_on_fault(vcpu,*iha);
                return IA64_VHPT_FAULT;
+       }
 
        /*
         * Optimisation: this VHPT walker aborts on not-present pages
@@ -1418,6 +1420,7 @@ IA64FAULT vcpu_translate(VCPU *vcpu, UINT64 address, BOOLEAN is_data, UINT64 *pt
                vhpt_translate_count++;
                return IA64_NO_FAULT;
        }
+       *itir = vcpu_get_itir_on_fault(vcpu,address);
        return (is_data ? IA64_DATA_TLB_VECTOR : IA64_INST_TLB_VECTOR);
 }